  <%@ page language="java" %>
<%@ page session="true" %>
<%@ page import="java.sql.*,java.io.*,java.util.Random"%>

  <% String userid = request.getParameter("userid");%>

 <HTML>
    <HEAD>

    <script LANGUAGE="Javascript" SRC="Images/validate.js"></script>

    <LINK href="styles.css" type="text/css" rel="stylesheet">
    <script LANGUAGE="Javascript" SRC="Images/calender.js"></script>
   <script LANGUAGE="Javascript" SRC="">

		function ChkMandatoryField(F,T){
			var val= F.value;
			if(val==""){alert(T+" is mandatory");return false;}
		}
	function ChkNumField(F,T){
			var val = F.value;
			if(isNaN(val)==true||val==""){alert("Please enter numbers for "+T);return false;}
		}
		function ChkAlphaNumericField(F,T){
			var val = F.value;
			var pattern = /^([a-zA-Z0-9]{1,250})$/;
			if(!(pattern.test(val)==true)){alert("Please enter alphabets or numbers for "+T);return false;}
		}
		function ChkAlphaField(F,T){
			var val = F.value;
			var pattern = /^([a-zA-Z ]{1,250})$/;
			if(!(pattern.test(val)==true)){alert("Please enter text for "+T);return false;}
		}
		function ChkEmailField(F,T){
			var val = F.value;
			var pattern = /^([a-zA-Z0-9\_\.]{4,25})$/;
			if(!(pattern.test(val)==true)){alert("Please enter valid email for "+T);return false;}
		}
		function ChkDateField(F,T)
		{
			var val = F.value;
		    var pattern = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
		    if(!(pattern.test(val)==true)){alert("Please enter valid date format (yyyy-mm-dd) for "+T);return false;}
		}
		function validate()
		{
			var frm = document.forms(0);
			if(ChkMandatoryField(frm.BasicQualification,'Basic Qualification')==false) return false;

		
			
				if(ChkMandatoryField(frm.PercentageBQ,'Percentage in Graduation ')==false) return false;

if(ChkNumField(frm.PercentageBQ,'Percentage in Graduation ')==false) return false;

		
			    if(ChkMandatoryField(frm.YearOfPassBQ,'Year Of Pass Graduation')==false) return false;
			    if(ChkMandatoryField(frm.UniversityBQ,' Graduation done at University  ')==false) return false;
			    if(ChkMandatoryField(frm.PostGraduation,'Post Graduation')==false) return false;
				if(ChkMandatoryField(frm.Percentage,'Percentage in PG')==false) return false;

if(ChkNumField(frm.Percentage,'Percentage in PG ')==false) return false;
			    if(ChkMandatoryField(frm.YearOfPass,'Year Of Pass of PG')==false) return false;
			    if(ChkMandatoryField(frm.University,'PostGraduation done at University')==false) return false;
						
		}
	</script>
	</HEAD>
	<BODY class=Grad>
	<H2 align=center>Update Educational</H2>
	<FORM ACTION="UpdateEducation1.jsp" OnSubmit="return validate()">
	<TABLE align=center width="60%">
<TR class="row_title">
	<Td align=center>Educational Information<BR></Td>
</TR>		
				<Input type=hidden name='userid' value='<%=userid%>'size=10>

		<TR class=row_odd>
				<TH align="left">Basic Qualification<FONT COLOR="red">*</FONT></TH>
				<TD class=row_even>&nbsp;&nbsp;<select name='BasicQualification'>
				<option value=""> -- </option>
				<option value="BA"> B.A</option>
				<option value="BArch">B.Arch</option>
				<option value="BCA">BCA</option>
				<option value="BBA">B.B.A</option>
				<option value="BA">B.A</option>
				<option value="BCom">B.Com</option>
				<option value="BEd">B.Ed</option>
				<option value="BDS">BDS</option>
				<option value="BHM">BHM</option>
				<option value="BPharma">B.Pharma</option>
				<option value="BSc">B.Sc</option>
				<option value="BTech">BTech/BE</option>
				<option value="LLB">LLB</option>
				<option value="MBBS">MBBS</option>
				<option value="Diploma">Diploma</option>
				<option value="BVSC">BVSC</option>
				<option value="Other">Other</option>
				</select></TD>
		</TR>

		<TR class=row_odd><TH align="left">Percentage
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='PercentageBQ' value=''size=10>
		</TR>
		
		<TR class=row_odd><TH align="left">Year Of Pass
		<FONT  COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;
		<select name="YearOfPassBQ" value="">
		<option value=""> -- </option>
		<option value="1950"> 1950 </option>
		<script>
			for(var i=1951;i<=2020;i++){
				document.writeln("<option value="+i+">" + i + "</option>");
			}
		</script>
		</select></TD>
		</TR>

		<TR class=row_odd><TH align="left">University
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='UniversityBQ' value=''size=10>
		</TR>
                <TR class=row_odd>
				<TH align="left">Post Graduation<FONT COLOR="red">*</FONT></TH>
				<TD class=row_even>&nbsp;&nbsp;<select name='PostGraduation'>
				<option value="">--</option>
				<option value="CA">CA</option>
				<option value="CS">CS</option>
				<option value="ICWA">ICWA</option>
				<option value="IntegratedPG">IntegratedPG</option>
				<option value="LLM">LLM</option>
				<option value="MA">MA</option>
				<option value="MArch">M.Arch</option>
				<option value="MCom">M.Com</option>
				<option value="MEd">M.Ed</option>
				<option value="MPharma">M.Pharma</option>
				<option value="MSc">M.Sc</option>
				<option value="MTech">M.Tech</option>
				<option value="MBA">MBA/PGDM</option>
				<option value="MCA">MCA</option>
				<option value="PGDiploma">PG Diploma</option>
				<option value="MVSC">MVSC</option>
				<option value="MCM">MCM</option>
				<option value="Other">Other</option>
				</select></TD>
		</TR>
		<TR class=row_odd><TH align="left">Percentage
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='Percentage' value=''size=10>
		</TR>
		
		<TR class=row_odd><TH align="left">Year Of Pass
		<FONT  COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;
		<select name="YearOfPass" value="">
		<option value="">--</option>
		<option value="1950"> 1950 </option>
		<script>
			for(var i=1951;i<=2020;i++){
				document.writeln("<option value="+i+">"+i+"</option>");
			}
		</script>
		</select></TD>
		</TR>

		<TR class=row_odd><TH align="left">University
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='University' value=''size=10>
		</TR>
        <TR>
		<TH><INPUT TYPE="submit" value='Update' class=Button></TH>
		<TH><INPUT TYPE="reset" value='Clear' class=Button></TH></TR>
		</TABLE>
	<H6 align=center>Fields with <FONT SIZE="" COLOR="red">*</FONT> are mandatory </H6>
	</FORM>
	</BODY>

 <HTML>